/*
** Copyright (C) 2011 Viens Yann
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "Coord2I.hpp"

Coord2I::Coord2I()
{
}

Coord2I::Coord2I(const int x, const int y): _x(x), _y(y)
{
}

Coord2I::Coord2I(Coord2I const& src): _x(src._x), _y(src._y)
{
}

Coord2I&	Coord2I::operator=(Coord2I const &right)
{
  _x = right._x;
  _y = right._y;
  return *this;
}

Coord2I		Coord2I::operator+(Coord2I const& right)
{
  Coord2I	result;

  result._x = _x + right._x;
  result._y = _y + right._y;
  return result;
}

Coord2I		Coord2I::operator-(Coord2I const& right)
{
  Coord2I	result;

  result._x = _x - right._x;
  result._y = _y - right._y;
  return result;
}

Coord2I		Coord2I::operator*(Coord2I const& right)
{
  Coord2I	result;

  result._x = _x * right._x;
  result._y = _y * right._y;
  return result;
}
